695
class Solution {
    int x = 0;
    int y = 0;

    public int maxAreaOfIsland(int[][] grid) {
        int max = 0;
        x = grid.length;
        y = grid[0].length;
        int[] count = new int[1];
        for (int i = 0; i  x; i++) {
            for (int j = 0; j  y; j++) {
                if (grid[i][j] == 1) {
                    fun(grid, i, j, count);
                    max = Math.max(max, count[0]);
                    count[0] = 0;
                }
            }
        }
        return max;
    }

    public void fun(int[][] grid, int i, int j, int[] count) {
        grid[i][j] = 0;
        count[0]++;
        i++;
        if (i  x && grid[i][j] == 1) {
            fun(grid, i, j, count);
        }
        i -= 2;
        if (i = 0 && grid[i][j] == 1) {
            fun(grid, i, j, count);
        }
        i++;
        j++;
        if (j  y && grid[i][j] == 1) {
            fun(grid, i, j, count);
        }
        j -= 2;
        if (j = 0 && grid[i][j] == 1) {
            fun(grid, i, j, count);
        }
    }
}
import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        
        int n = in.nextInt();
        String str = "";
        while(n > 0){
            if (n % 2 == 0){
                str += '3';
                n = (n - 2) / 2;
            }else {
                str += '2';
                n = (n - 1) / 2;
            }
        }   
        StringBuffer a = new StringBuffer();
        for (int i = str.length()-1; i >= 0; i--){
            a.append(str.charAt(i));
        }  
        System.out.println(a.toString());
    }
    
}